 // 经典闭包示例
function createCounter() {
    let count = 0
    
    return function() {
      return ++count
    }
  }
  
  const counter1 = createCounter()
  const counter2 = createCounter()
  
  console.log(counter1()) // ? 1
  console.log(counter1()) // ? 2 同一个闭包
  console.log(counter2()) // ? 1
   